<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>超市订单管理系统</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css"/>
    <link type="text/css" rel="stylesheet" href="/css/public.css"/>
</head>
<body>
<div>
    <!--头部-->
    <header class="publicHeader">
        <h1>超市订单管理系统</h1>
        <div class="publicHeaderR">
            <p><span>下午好！</span><span style="color: #fff21b">admin</span> , 欢迎你！</p>
            <a href="/loginOut">退出</a>
        </div>
    </header>
    <!--时间-->
    <section class="publicTime">
        <span id="time">时间</span>
        <a href="#">温馨提示：为了能正常浏览，请使用高版本浏览器！（IE10+）</a>
    </section>
</div>
<!--主体内容-->
<section class="publicMian">
    <!--左侧导航-->
    <div>
        <div th:insert="~{left :: left}"></div>
    </div>
    <!--右侧内容-->
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>
                <a th:href="@{/useraddres}">收货地址管理页面</a> &gt;&gt;
                <span th:if="${null == addres.id}">收货地址添加页面</span>
                <span th:if="${null != addres.id}">收货地址修改页面</span>
            </span>
        </div>
        <div class="providerAdd">
            <form id="addressForm" name="addressForm" th:method="POST" th:action="@{/useraddres}" th:object="${addres}">
                <input type="hidden" name="_method" value="PUT" th:if="${null != addres.id}" th:value="*{id}" />
                <input type="hidden" name="id" th:value="*{id}">
                <input type="hidden" name="sysUserId"  th:value="*{sysUserId}"/>
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div>
                    <label for="receiveName">收货人姓名：</label>
                    <input type="text" name="receiveName" id="receiveName"  th:value="*{receiveName}">
                    <!-- 放置提示信息 -->
                    <span color="red" th:text="${null != errors ? errors['receiveName'] : ''}"></span>
                </div>
                <div>
                    <label for="receivePhone">收货人电话：</label>
                    <input type="text" name="receivePhone" id="receivePhone" th:value="*{receivePhone}">
                    <!-- 放置提示信息 -->
                    <span color="red" th:text="${null != errors ? errors['receivePhone'] : ''}"></span>
                </div>
                <div>
                    <label for="receiveAddress">收货地址：</label>
                    <input type="text" name="receiveAddress" id="receiveAddress" th:value="*{receiveAddress}">
                    <!-- 放置提示信息 -->
                    <span color="red" th:text="${null != errors ? errors['receiveAddress'] : ''}"></span>
                </div>
                <div>
                    <label for="isDefault">是否为默认地址：</label>
                    <input type="radio" name="isDefault" id="isDefault" value="0" th:checked="checked"/>否
                    <input type="radio" name="isDefault" value="1"/>是
                    </select>
                    <!-- 放置提示信息 -->
                    <span color="red" th:text="${null != errors ? errors['isDefault'] : ''}"></span>
                </div>
                <div class="providerAddBtn">
                    <p></p>
                    <input type="submit" id="add" name="add" th:value="保存"/>
                    <input type="button" id="back" name="back" th:value="返回"/>
                </div>
            </form>
        </div>
    </div>
</section>
<div>
<footer class="footer">
    版权信息
</footer>
<script type="text/javascript" src="/js/time.js"></script>
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/calendar/WdatePicker.js"></script>
</div>
<script type="text/javascript" src="/js/user.js"></script>
</body>
</html>